fix(website): comprehensive light mode CSS fixes for Tailwind v4#515
fix(website): comprehensive light mode CSS fixes for Tailwind v4#515ajitpratap0 merged 1 commit intomainfrom
Conversation
The light mode was broken because Tailwind v4 compiles utilities inside @layer which wins the CSS cascade over unlayered selectors, and many classes use arbitrary values (bg-[#09090b]) or slash-encoded opacities (bg-white/[0.06]) that attribute selectors can't match. Fixes: - Add !important to all html.light overrides for Tailwind v4 cascade - Add direct class selectors for bg-white/[0.06], bg-white/5, etc. - Add bg-[#09090b] override for playground root container - Add bg-slate-900/50, bg-slate-900/30 etc. direct overrides - Add border-white/[0.06], border-white/10 etc. direct overrides - Darken slate text overrides for better playground contrast - Override all select elements for light mode - Add playground-specific overrides (blue tabs, emerald code, dividers) - Keep green parser dot, loading skeletons, hover states correct Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ajitpratap0's task —— View job Code Review Complete ✅I've thoroughly reviewed this light mode CSS fix. Here's my comprehensive feedback: Todo List:
Review SummaryOverall Assessment: ✅ Approved with minor suggestions This is a well-executed fix for the light mode issues introduced by the Tailwind v4 upgrade. The approach is pragmatic and technically sound. Code Quality & Best Practices✅ Strengths:
🔄 Suggestions for Improvement:
Potential Issues & Bugs
|
Summary
Fixes the broken light mode that was introduced in #514. The light mode CSS overrides weren't working because:
@layerwhich beats unlayered selectors regardless of specificity. Fixed with!important.bg-[#09090b]on the playground root container couldn't be matched by any named-class selector. Added escaped arbitrary value selector.bg-white/[0.06],border-white/10,bg-slate-900/50etc. use Tailwind v4 class encoding that attribute selectors ([class*="..."]) can't reliably match. Added direct class selectors.Changes
Single file:
website/src/app/globals.css(+83, -20)!importantto allhtml.lighttext, background, border overridesbg-white/[x],border-white/[x]variantsbg-[#09090b]andbg-[#0F172A]playground container overridesbg-slate-900/50,bg-slate-900/30,bg-slate-700/50direct overridestext-slate-400→#475569) for playground contrastselectelements in light modeTest Plan
next buildpasses (51 pages, 0 errors)Breaking Changes
None.
🤖 Generated with Claude Code